package com.cn.wanxi.util;

public class Variable {
    //    在类的{}里面写的变量叫做全局变量
    int salary;
    static int age;

    public static void main(String[] args) {
//        定义一个变量/局部变量
        System.out.println(age);
        int salary = 1000;
        int a = 0, b, d, e;
//        new Variable().salary
        System.out.println(a);
        System.out.println(salary);
        salary = 12000;
        System.out.println(salary);
        int age = 10;
        System.out.println(age);
    }

    public void getSalary() {
        System.out.println(salary);
    }
}